/*
2021-8-8
https://www.acwing.com/problem/content/3798/
*/ 
#include<cstring>
#include<iostream>
#include<algorithm>

using namespace std;
int a[4];

int main()
{
	for(int i=0;i<4;i++) cin>>a[i];
	sort(a,a+4);
	cout<<a[3]-a[2]<<' '<<a[3]-a[1]<<' '<<a[3]-a[0]<<endl;
	
	return 0;
}
